import java.util.*;

class Food {
}
class Fruit extends Food {
}
class Apple extends Fruit {
}
class Banana extends Fruit {
}
class Message<T> {
    private T message ;
    public T getMessage() {
        return message;
    }
    public void setMessage(T message) {
        this.message = message;
    }
}
public class TestDemo {
    public static void fun(Message<? extends Fruit> temp){
        Fruit fruit=temp.getMessage();
    }
    public static void fun1(ArrayList<Integer>list){

    }

    public static void main(String[] args) {
        List<Integer>list= new ArrayList<Integer>();
        List<Integer>list1= new LinkedList<>();
        List<Integer>list2= new Stack<>();

        ArrayList<Integer>list3= new ArrayList<Integer>();
        LinkedList<Integer>list111= new LinkedList<>();
        Stack<Integer>list222= new Stack<>();

    }
    public static void main3(String[] args) {
        Integer a1=200;
        Integer a2=200;
        System.out.println(a1==a2);
    }
    public static void main2(String[] args) {
        int tmp=9;
        //自动装箱
        Integer a=tmp;

        //显示装箱
        Integer.valueOf(tmp);

        Integer a2=new Integer(tmp);
        //自动拆箱
        int tmp1=a2;

        //显示拆箱
        int tmp2=a2.intValue();

        double tmp3=a2.doubleValue();


    }
    public static void main1(String[] args) {
        Message<Apple> message = new Message<>() ;
        fun(message);
        Message<Banana> message2 = new Message<>() ;
        message2.setMessage(new Banana());
        fun(message2);


    }

}
